package cn.hdmis.util;

import java.io.Serializable;

import net.sf.json.JSONObject;

public class SysMessageBean implements Serializable {

	private static final long serialVersionUID = 1L;
	private Integer idcode;
	private String type;
	private String msg;
	private String msgDetail;
	
	public SysMessageBean(){
		
	}
	public SysMessageBean(String type,String msg){
		this.type = type;
		this.msg = msg;
	}
	public SysMessageBean(Integer code,String type,String msg){
		this.idcode = code;
		this.type = type;
		this.msg = msg;
	}
	public SysMessageBean(Integer code,String type,String msg,String msgDetail){
		this.idcode = code;
		this.type = type;
		this.msg = msg;
		this.msgDetail = msgDetail;
	}
	public Integer getIdcode() {
		return idcode;
	}
	public void setIdcode(Integer idcode) {
		this.idcode = idcode;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public String getMsgDetail() {
		return msgDetail;
	}
	public void setMsgDetail(String msgDetail) {
		this.msgDetail = msgDetail;
	}
	public String toString() {
		return "SysMessageBean [idcode=" + idcode + ", msg=" + msg + ", msgDetail="
				+ msgDetail + ", type=" + type + "]";
	}
	public String toJson(){
		return JSONObject.fromObject(this).toString();
	}
}
